package org.jeecg.modules.api.falback;

import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.api.CyEmissionFactorApi;
import org.jeecg.modules.api.DTO.AddEmissionByCarbonCheckDTO;
import org.jeecg.modules.api.DTO.EmissionFactorQueryDTO;
import org.jeecg.modules.api.DTO.PrivateFactorQueryDTO;
import org.jeecg.modules.api.VO.EmissionFactorDescribeVO;
import org.jeecg.modules.api.VO.EmissionFactorVO;
import org.jeecg.modules.api.entity.CyEmissionFactor;
import org.jeecg.modules.api.entity.CyEmissionUnit;
import org.jeecg.modules.api.entity.CyGasStore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * @author mjh
 * Date: 2024/11/19 18:59
 */
@Component
@ConditionalOnMissingClass("org.jeecg.modules.factor.controller.CyEmissionFactorApiController")
public class CyEmissionFactorFallback implements CyEmissionFactorApi {
    @Override
    public Result<EmissionFactorVO> listInfo(String id) {
        return Result.error("进入到了碳排因子模块查询因子详情的熔断方法中...") ;
    }

    @Override
    public Result<List<CyEmissionFactor>> batchGetFactorInfo(List<String> idList) {
        return Result.error("进入到了批量查询碳排因子主体信息的熔断方法中...") ;
    }

    @Override
    public Result<List<EmissionFactorVO>> batchListInfo(List<String> idList) {
        return Result.error("进入到了碳排因子模块批量查询因子详情的熔断方法中...") ;
    }

    @Override
    public Result<?> privateQueryPageList(PrivateFactorQueryDTO privateFactorQueryDTO, Integer pageNo, Integer pageSize) {
        return Result.error("进入到了产品碳足迹和组织碳盘查中使用的分页列表查询的熔断方法中...") ;
    }

    @Override
    public Result<List<EmissionFactorDescribeVO>> describeList(List<String> idList) {
        return Result.error("进入到了批量查询碳排因子使用说明对象的熔断方法中...") ;
    }

    @Override
    public Result<String> emissionCollect(String emissionFactorId) {
        return Result.error("进入到了碳排因子收藏的熔断方法中...") ;
    }

    @Override
    public Result<String> addEmissionByCarbonCheck(AddEmissionByCarbonCheckDTO addEmissionByCarbonCheckDTO) {
        return Result.error("进入到了组织碳盘查中的手动添加碳排因子的熔断方法中...") ;
    }

    @Override
    public Result<?> getAllUnitGroup() {
        return Result.error("进入到了查询所有单位分组的熔断方法中...") ;
    }

    @Override
    public Result<Map<String, List<CyEmissionUnit>>> getUnitTree() {
        return Result.error("进入到了返回单位树形结构的熔断方法中...") ;
    }

    @Override
    public Result<?> batchGetGasRatio(List<String> EmissionFactorIdList) {
        return Result.error("进入到了根据碳排因子idList获取到所有碳排因子中的所有气体配比信息的熔断方法中...") ;
    }

    @Override
    public Result<?> getCollectList(EmissionFactorQueryDTO emissionFactorQueryDTO, Integer pageNo, Integer pageSize, HttpServletRequest req) {
        return Result.error("进入到了碳排因子收藏分页列表查询的熔断方法中...") ;
    }

    @Override
    public Result<List<CyGasStore>> batchGetGasStore() {
        return Result.error("进入到了气体类型列表查询的熔断方法中...") ;
    }

    @Override
    public Result<Double> getConvertValue(String sourceUnit, String targetUnit) {
        return Result.error("进入到了根据原单位和目标单位查询出转换比率的熔断方法中...") ;
    }


}
